{% extends "base.html" %}
{% block title %}<title>Show Group</title>{% endblock %}
{% block content %}
<div>
<div class="pull-right">
	<form class="form-search" method="POST">
	<input type="text" name ="search" class="input-medium search-query" placeholder="Search">
	<button type="submit" class="btn">Search</button>&nbsp;&nbsp;
	</form>
</div>
</div>
	<hr>
      <table class="table table-bordered table-striped">
		<thead>
			<tr>
			<th>组名</th>
			<th>包含的主机</th>
			<th>创建时间</th>
			<th>创建人</th>
			</tr>
		</thead>
		<tbody>
			{% for group  in grouplist %}
			<tr>
			<td><a href="#" title="Edit Group">{{group.host_groupname}}</a></td>
{#                jinja2模版 join用法 合并一个列表。#}
{#		有问题 组多了就乱了	<td>{{group_host|join:"、"}}</td>#}
			<td>{{group.host.all|join:"、"}}</td>
			<td>{{group.create_date}}</td>
			<td>{{group.create_user}}</td>
			<td>
{#				<div class="btn-group">#}
{#				<a class="btn" href="{% url 'svnupdate' svn.id 1 %}" title="Update svn"><i class="icon-refresh"></i>更新</a>#}
{#				<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">回滚<span class="caret"></span></a>#}
{#				<ul class="dropdown-menu">#}
{#				<li><a href="{% url 'svnupdate' svn.id 2 %}">上一版本</a></li>#}
{#				<li><a href="#">指定版本</a></li>#}
{#              </ul>#}
{#                 <a class="btn" href="{% url 'svnupdate' svn.id 2 %}" title="back svn"><i class="icon-refresh"></i>回滚</a>#}
{##}
{#				</div>#}
			</td>
			</tr>
			{% endfor %}
		</tbody>
	  </table>
	  
	  <div class="pagination pagination-centered">
	  <div class="pull-right"><span class="label">{{grouplist}}</span></div>
		<ul>{% if not grouplist.has_previous %}
			<li class="active"><a>前一页</a></li>
			{% endif %}
			{% if grouplist.has_previous %}
			<li><a href="?page={{ grouplist.previous_page_number }}">前一页</a></li>
			{% endif %}
			{% if not grouplist.has_next %}
			<li class="active"><a>后一页</a></li>
			{% endif %}
			{% if grouplist.has_next %}
			<li><a href="?page={{ grouplist.next_page_number }}">后一页</a></li>
			{% endif %}
		</ul>
	  </div>

{% endblock %}
